Optimal. Leaf size=192 \[ \frac {5 a^{5/2} (5 A+8 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}+\frac {a^3 (49 A-24 C) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (3 A-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {5 a A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.42, antiderivative size = 192, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4172, 4102,
4103, 4100, 3859, 209} \begin {gather*} \frac {5 a^{5/2} (5 A+8 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{8 d}+\frac {a^3 (49 A-24 C) \sin (c+d x)}{24 d \sqrt {a \sec (c+d x)+a}}-\frac {a^2 (3 A-8 C) \sin (c+d x) \sqrt {a \sec (c+d x)+a}}{4 d}+\frac {A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^{5/2}}{3 d}+\frac {5 a A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^{3/2}}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3859
Rule 4100
Rule 4102
Rule 4103
Rule 4172
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+a \sec (c+d x))^{5/2} \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}+\frac {\int \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \left (\frac {5 a A}{2}-\frac {1}{2} a (A-6 C) \sec (c+d x)\right ) \, dx}{3 a}\\ &=\frac {5 a A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}+\frac {\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (\frac {1}{4} a^2 (31 A+24 C)-\frac {3}{4} a^2 (3 A-8 C) \sec (c+d x)\right ) \, dx}{6 a}\\ &=-\frac {a^2 (3 A-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {5 a A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}+\frac {\int \cos (c+d x) \sqrt {a+a \sec (c+d x)} \left (\frac {1}{8} a^3 (49 A-24 C)+\frac {1}{8} a^3 (13 A+72 C) \sec (c+d x)\right ) \, dx}{3 a}\\ &=\frac {a^3 (49 A-24 C) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (3 A-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {5 a A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}+\frac {1}{16} \left (5 a^2 (5 A+8 C)\right ) \int \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a^3 (49 A-24 C) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (3 A-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {5 a A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}-\frac {\left (5 a^3 (5 A+8 C)\right ) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}\\ &=\frac {5 a^{5/2} (5 A+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}+\frac {a^3 (49 A-24 C) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (3 A-8 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {5 a A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{12 d}+\frac {A \cos ^2(c+d x) (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.46, size = 132, normalized size = 0.69 \begin {gather*} \frac {a^2 \left (15 (5 A+8 C) \text {ArcTan}\left (\sqrt {-1+\sec (c+d x)}\right )+(17 A+48 C+3 (27 A+8 C) \cos (c+d x)+17 A \cos (2 (c+d x))+2 A \cos (3 (c+d x))) \sqrt {-1+\sec (c+d x)}\right ) \sqrt {a (1+\sec (c+d x))} \sin (c+d x)}{24 d (1+\cos (c+d x)) \sqrt {-1+\sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(582\) vs.
\(2(168)=336\).
time = 24.02, size = 583, normalized size = 3.04
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (75 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+120 C \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+150 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}+240 C \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}+75 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )+120 C \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )+64 A \left (\cos ^{6}\left (d x +c \right )\right )+208 A \left (\cos ^{5}\left (d x +c \right )\right )+328 A \left (\cos ^{4}\left (d x +c \right )\right )+192 C \left (\cos ^{4}\left (d x +c \right )\right )-600 A \left (\cos ^{3}\left (d x +c \right )\right )+192 C \left (\cos ^{3}\left (d x +c \right )\right )-384 C \left (\cos ^{2}\left (d x +c \right )\right )\right ) a^{2}}{192 d \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}\) | \(583\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.24, size = 380, normalized size = 1.98 \begin {gather*} \left [\frac {15 \, {\left ({\left (5 \, A + 8 \, C\right )} a^{2} \cos \left (d x + c\right ) + {\left (5 \, A + 8 \, C\right )} a^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (8 \, A a^{2} \cos \left (d x + c\right )^{3} + 34 \, A a^{2} \cos \left (d x + c\right )^{2} + 3 \, {\left (25 \, A + 8 \, C\right )} a^{2} \cos \left (d x + c\right ) + 48 \, C a^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{48 \, {\left (d \cos \left (d x + c\right ) + d\right )}}, -\frac {15 \, {\left ({\left (5 \, A + 8 \, C\right )} a^{2} \cos \left (d x + c\right ) + {\left (5 \, A + 8 \, C\right )} a^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (8 \, A a^{2} \cos \left (d x + c\right )^{3} + 34 \, A a^{2} \cos \left (d x + c\right )^{2} + 3 \, {\left (25 \, A + 8 \, C\right )} a^{2} \cos \left (d x + c\right ) + 48 \, C a^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{24 \, {\left (d \cos \left (d x + c\right ) + d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 967 vs.
\(2 (168) = 336\).
time = 2.13, size = 967, normalized size = 5.04 \begin {gather*} -\frac {\frac {96 \, \sqrt {2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} C a^{3} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a} + 15 \, {\left (5 \, A \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 8 \, C \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right ) - 15 \, {\left (5 \, A \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 8 \, C \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right ) + \frac {4 \, {\left (75 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{10} A \sqrt {-a} a^{3} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 72 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{10} C \sqrt {-a} a^{3} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 1125 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{8} A \sqrt {-a} a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 888 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{8} C \sqrt {-a} a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 6174 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{6} A \sqrt {-a} a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 3024 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{6} C \sqrt {-a} a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 4314 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} A \sqrt {-a} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 1776 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} C \sqrt {-a} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 807 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} A \sqrt {-a} a^{7} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 360 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} C \sqrt {-a} a^{7} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 49 \, \sqrt {2} A \sqrt {-a} a^{8} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 24 \, \sqrt {2} C \sqrt {-a} a^{8} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}}{{\left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}\right )}^{3}}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (c+d\,x\right )}^3\,\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________